<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/layouts/base.jsp"%>
<!DOCTYPE HTML>
<html>
  <head>
    <title>产品列表</title>
    <link rel="stylesheet" href="${ctxsta}/order/main/css/style.css" />
    <link rel="stylesheet" href="${ctxsta}/common/bootstrap-table-master/bootstrap-table.min.css" />
    <link rel="stylesheet" href="${ctxsta}/common/bootstrap-datepicker-master/css/bootstrap-datepicker.min.css" />
  </head>
  
  <body class="fixed-sidebar full-height-layout gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight" >
        <div class="row">
            <div class="col-sm-3">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>订单统计</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <h4 class="no-margins">
                        	<p>${onGoodsNumber}/${allGoodsNumber}
	                        	<span class="label label-warning pull-right">订单总量</span>
	                        </p>
                        </h4>
                        
                        
                        <h4 class="no-margins">
                        	<p>${outGoodsNumber}/${allGoodsNumber}
	                        	<span class="label label-warning pull-right">今日处理</span>
	                        </p>
                        </h4>
                    </div>
                </div>
            </div>
            <div class="col-sm-9">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>搜索查询</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content search-query">
	                    <form action="${ctx}/system/goods/list" method="post" id="searchForm">
	                        <div class="col-sm-6">
	                            <div class="form-group" id="data_5">
	                                <label class="control-label">添加时间</label>
	                                <div class="input-daterange input-group" id="datepicker">
	                                    <input type="text" class="form-control" name="queryGoods.beginCreateTime" value="" />
	                                    <span class="input-group-addon">到</span>
	                                    <input type="text" class="form-control" name="queryGoods.endCreateTime" value="" />
	                                </div>
	                            </div>
	                        </div>
	                        <div class="col-sm-6">
	                            <div class="form-group">
	                                <label class="control-label">产品信息</label>
	                                <div class="input-group">
	                                    <input type="text" class="form-control" name="queryGoods.search"> 
	                                    <span class="input-group-btn"><button type="button" class="btn btn-primary" onclick="javascript:$('#searchForm').submit();">搜索</button> </span>
	                                </div>
	                            </div>
	                        </div>
	                        <div class="clearfix"></div>
	                    </form>
                    </div>
                    
                </div>
            </div>
       </div>
       <div class="row">
            <div class="col-sm-3">
                <div class="ibox">
                    <div class="ibox-content">
                        <h3>产品类目列表</h3>
                        <p class="small"><i class="fa fa-hand-o-up"></i> 在列表之间拖动产品分类</p>
                        <ul class="sortable-list connectList agile-list">
                        <c:forEach items="${osCategoryDtoList}" var="osCategoryDto" varStatus="status">
                            <li class="<c:if test="${status.index % 3 == 0 }">success-element</c:if><c:if test="${status.index % 3 == 1 }">warning-element</c:if><c:if test="${status.index % 3 == 2 }">info-element</c:if>">
                                ${osCategoryDto.name}<span class="badge <c:if test="${status.index % 3 == 0 }">badge-primary</c:if><c:if test="${status.index % 3 == 1 }">badge-warning</c:if><c:if test="${status.index % 3 == 2 }">badge-success</c:if> m-l">${osCategoryDto.number}</span>
                                <div class="agile-detail">
                                    <a onclick="member_show('${osCategoryDto.name}','${ctx }/system/goods/list','${osCategoryDto.categoryId}','goods','1000',null)" class="pull-right btn btn-xs <c:if test="${status.index % 3 == 0 }">btn-primary</c:if><c:if test="${status.index % 3 == 1 }">btn-warning</c:if><c:if test="${status.index % 3 == 2 }">btn-success</c:if>">查看</a>
                                    <i class="fa fa-clock-o"></i> 
                                </div>
                            </li>
                        </c:forEach>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="col-sm-9">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>产品列表</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row row-lg">
                            <div class="col-sm-12">
                                <div class="example-wrap">
                                    <div class="example">
                                    	<div id="toolbar">
		                                	<button id="addProduct" type="button" class="btn btn-default" >
		                                        <i class="glyphicon glyphicon-plus"></i>添加
		                                    </button>
									        <button id="remove" class="btn btn-danger" disabled>
									            <i class="glyphicon glyphicon-remove"></i>删除
									        </button>
									        <button id="putShelve" class="btn btn-danger" disabled>
									            <i class="glyphicon glyphicon-remove"></i>上架
									        </button>
									        <button id="pullShelve" class="btn btn-danger" disabled>
									            <i class="glyphicon glyphicon-remove"></i>下架
									        </button>
									    </div>
                                        <table id="table"
									           data-toolbar="#toolbar"
									           data-search="true"
									           data-show-refresh="true"
									           data-show-toggle="true"
									           data-show-columns="true"
									           data-show-export="true"
									           data-detail-view="true"
									           data-detail-formatter="detailFormatter"
									           data-minimum-count-columns="2"
									           data-show-pagination-switch="true"
									           data-pagination="true"
									           data-id-field="id"
									           data-sort-name="createTime"
               								   data-sort-order="desc"
									           data-page-list="[10, 25, 50, 100, ALL]"
									           data-show-footer="false"
									           data-side-pagination="server"
									           data-url="${ctx}/system/order/list/data"
									           data-response-handler="responseHandler">
									    </table>
                                    </div>
                                </div>
                        	</div>
                    	</div>
                    </div>
                </div>
            </div>
    	</div>
    </div>
    <myfooter>
    <!-- jquery-ui-->
    <script src="${ctxsta}/common/jquery/jquery-ui.min.js"></script>
    <!-- Bootstrap table -->
    <script src="${ctxsta}/common/bootstrap-table-master/bootstrap-table.min.js"></script>
    <script src="${ctxsta}/common/bootstrap-table-master/extensions/export/bootstrap-table-export.js"></script>
    <script src="${ctxsta}/common/bootstrap-table-master/tableExport.js"></script>
    <script src="${ctxsta}/common/bootstrap-table-master/locale/bootstrap-table-zh-CN.min.js"></script>
    <!-- Data picker -->
    <script src="${ctxsta}/common/bootstrap-datepicker-master/js/bootstrap-datepicker.min.js"></script>
    <!-- 自定义js -->
    <script src="${ctxsta}/order/main/js/layer.js"></script>
    <script src="${ctxsta}/order/main/js/order_list.js"></script>
    <script src="${ctxsta}/order/main/js/order_list_table.js"></script>
    </myfooter>
  </body>
</html>
